add = 2
ans = 1
start = 1
while start < 1002001:
    for i in xrange(4):
        start += add
        ans += start
    add += 2
print start, ans
